package com.huaxiafinance.management.service;

import com.huaxiafinance.management.dto.request.LoginDto;
import com.huaxiafinance.management.dto.request.QueryRoleDto;
import com.huaxiafinance.management.dto.request.UpdateUserPasswordDto;
import com.huaxiafinance.management.model.Role;
import com.huaxiafinance.management.model.User;
import com.huaxiafinance.management.model.UserRole;
import com.huaxiafinance.management.model.YfqImg;
import com.huaxiafinance.management.util.MessageResult;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;

public interface UserService {

  public MessageResult login(LoginDto dto, final HttpSession session, HttpServletResponse response)
      throws Exception;

  public MessageResult addUser(User user) throws Exception;

  public boolean delUser(Integer id) throws Exception;

  public boolean updUser(User user) throws Exception;

  public boolean addUserRole(UserRole userRole) throws Exception;

  public boolean updateUserRole(UserRole userRole) throws Exception;

  public List<UserRole> queryUserRole(Integer id) throws Exception;

  public List<Role> queryRole() throws Exception;

  public List<User> queryUser(QueryRoleDto dto) throws Exception;

  public int countUser(QueryRoleDto dto) throws Exception;

  public User beforUpdateUser(Integer id) throws Exception;

  public boolean updatePassword(UpdateUserPasswordDto dto) throws Exception;

  public User selectSaleMan(String userName) throws Exception;

  List<YfqImg> queryUserImg(String orderNo);
}
